//
//  WHYTabBarViewController.m
//  OSChina
//
//  Created by 王洪运 on 15/12/15.
//  Copyright © 2015年 王洪运. All rights reserved.
//

#import "WHYTabBarViewController.h"

#import "UINavigationController+Extension.h"

#pragma mark - 控制器头文件
#import "WHYNewsViewController.h"
#import "WHYDiscoverViewController.h"
#import "WHYTweetsViewController.h"
#import "WHYProfileViewController.h"

@interface WHYTabBarViewController ()

@end

@implementation WHYTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self loadSubViewController];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - 加载tabBar的子控制器
-(void)loadSubViewController {
    
    UINavigationController *newsNav = [UINavigationController navigationControllerWithViewController:[[WHYNewsViewController alloc] init] andTitle:@"综合" andImageName:@"tabbar-news"];
    
    UINavigationController *tweetsNav = [UINavigationController navigationControllerWithViewController:[[WHYTweetsViewController alloc] init] andTitle:@"动弹" andImageName:@"tabbar-tweet"];
    
    UINavigationController *discoverNav = [UINavigationController navigationControllerWithViewController:[[WHYDiscoverViewController alloc] init] andTitle:@"发现" andImageName:@"tabbar-discover"];
    
    UINavigationController *profileNav = [UINavigationController navigationControllerWithViewController:[[WHYProfileViewController alloc] init] andTitle:@"我" andImageName:@"tabbar-me"];
    
    UINavigationController *emptyNav = [[UINavigationController alloc] init];
    
    self.viewControllers = @[newsNav, tweetsNav, emptyNav, discoverNav, profileNav];
}





@end
